<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta name="renderer" content="webkit" />
    <meta name="force-rendering" content="webkit" />
{{--    <link rel="shortcut icon" href="/uploads/20240606/3606f2da74579f0cf1954de93eaeb94f.png" />--}}
    <title>案件详情</title>
{{--    <meta name="keywords"--}}
{{--          content="PacifiCap Properties Group,PacifiCap Properties Group地址,PacifiCap Properties Group怎么样,PacifiCap Properties Group电话,PacifiCap Properties Group官网" />--}}
{{--    <meta name="description"--}}
{{--          content="查询PacifiCap Properties Group工商注册信息、公司电话、公司地址、公司邮箱网址、公司经营风险、公司发展状况、公司财务状况、公司股东法人高管、商标、融资、专利、法律诉讼等PacifiCap Properties Group企业信用信息，想了解PacifiCap Properties Group怎么样，就上Keepoe。" />--}}

    <script src="{{ asset('web/js/head-lang-obj.js') }}"></script>

    <link href="{{ asset('web/css/visual.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ asset('web/css/global.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ asset('web/css/iconfont.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ asset('web/css/style.css') }}" rel="stylesheet" type="text/css" />
    <script src="{{ asset('web/js/jquery-1.7.2.min.js') }}"></script>
    <script src="{{ asset('web/js/jquery.lazyload.min.js') }}"></script>
    <script src="{{ asset('web/js/global-1.00030-269.js') }}"></script>
    <script src="{{ asset('web/js/global-1.00030-2691.js') }}"></script>
    <script src="{{ asset('web/js/particles.js') }}"></script>
    <link href="{{ asset('web/css/flag.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ asset('web/css/iconfont_1.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ asset('web/css/b2b_enterprise_library.css') }}" rel="stylesheet" type="text/css" />
    <script type="application/ld+json" async="">
      {
        "@context": "https:\/\/schema.org",
        "@type": "WebSite",
        "url": "",
        "potentialAction": {
          "@type": "SearchAction",
          "target": {
            "@type": "EntryPoint",
            "urlTemplate": "\/structural?page=index&q={search_term_string}"
          },
          "query-input": "required name=search_term_string"
        }
      }
    </script>
</head>

<body class="lang_cn list">
<script>
    const ajax_request_domain = "";

    // set cache
    function setLocalStorage(name, val, expire = 0) {
        localStorage.setItem(
            name,
            JSON.stringify({
                val: val,
                expire: expire,
            })
        ); //转换成json字符串序列
    }
    // remove cache
    function removeLocalStorage(name) {
        localStorage.removeItem(name);
    }
    // get cache
    function getLocalStorage(name) {
        let defaultVal = "";
        if (name == "userId") {
            defaultVal = 0;
        }
        const val = localStorage.getItem(name); //get cache
        if (!val) {
            return defaultVal;
        }
        const dataobj = JSON.parse(val); //解析出json对象
        if (typeof dataobj !== "object") {
            return defaultVal;
        }
        if (parseInt(new Date().getTime() / 1000) > dataobj.expire) {
            //if expire
            removeLocalStorage(name);
            return defaultVal;
        } else {
            return dataobj.val;
        }
    }

    // 权限与限制
    var user_rule_data = [],
        user_limit_data = [];
    user_rule_data = getLocalStorage("user_rule_data");
    user_limit_data = getLocalStorage("user_limit_data");
    if (!user_rule_data) {
        user_rule_data = ["company_report", "report_global", "trade_list"];
    }
    if (!user_limit_data) {
        user_limit_data = {
            report_type: "day",
            report_global: 0,
            report_customs: 5,
            report_partner: 0,
            report_hs_code: 0,
            report_business_area: 0,
            report_port: 0,
            report_contact: 0,
            email_collect: 0,
            search_list: 10,
            clue_list: 10,
            trade_list: 0,
            trade_detail: 10,
            product_total: 0,
            export_total: 0,
            enterprise_employee: 5,
            employee_enterprise_employee: 5,
            canton_fair_exhibition: 3,
            canton_fair_employee: 5,
            financing_development: 5,
        };
    }

    var zuoooo_config = {
        domain: "",
        date: "2024/10/22 16:13:19",
        lang: "cn",
        currency: "",
        currency_symbols: "",
        currency_rate: "",
        FbAppId: "",
        FbPixelOpen: "0",
        UserId: "0",
        TouristsShopping: "1",
        PaypalENV: "production",
        PaypalExcheckout: "",
        PaypalLoaclPayment: "",
        PaypalLang: "zh_CN",
        PaypalBusiness: "1",
        PaypalCreditCard: "1",
        tmp_dir: "/tmp/",
        Permit: {
            ability: user_rule_data,
            limits: user_limit_data,
            Level: "0",
        },
        normal_cout: {
            buyer: "875",
            supplier: "672",
            country: "239",
        },
        default_area_ary: [
            "VN",
            "IN",
            "ID",
            "PH",
            "KZ",
            "BD",
            "PK",
            "UZ",
            "US",
            "MX",
            "CO",
            "PE",
            "CL",
            "PA",
            "UY",
            "EC",
            "AR",
            "UA",
            "RU",
            "CA",
            "KE",
            "ET",
        ],
        IsMobile: 0,
        IsApp: 0,
        selectTimeData: "2024-01-01",
        endTimeDate: "2024-01-31",
        consultant: {
            name: "AMY",
            qrcode: "/assets/site_resource/picture/qrcode_w.png",
            b_qrcode: "/assets/site_resource/picture/qrcode_b.png",
            phone: "13028334710",
        },
    };
    window.onhashchange = function () {
        if (document.location.pathname.indexOf("/cart/complete/") != -1) {
            window.history.replaceState(null, null, "/cart/checkout.html");
            window.history.go(0);
        }
    };
</script>
<div id="header">
    <input type="hidden" id="AccountId" value="0" />
    <input type="hidden" id="Level" value="0" />
    <input type="hidden" id="IsLastOrders" value="0" />
    <div class="menu"></div>
    <div class="logo">
        <a href="{{ route('/') }}">
            <img src="{{ asset('web/icon/logo@2x.png') }}" />
        </a>
    </div>
    <div class="nav">
        <div class="item">
            <div class="name clue_list">
                <!-- <a class="" href="./buyer.html">
                        Buyers </a> -->
            </div>
        </div>
        <div class="item">
            <div class="name clue_list">
                <!-- <a class="" href="./supplier.html">
                        Suppliers </a> -->
            </div>
        </div>
        <div class="item">
            <div class="name clue_list">
                <!-- <a class="" href="./trade.html">
                        Trade Data </a> -->
            </div>
        </div>
        <div class="item B2B_enterprise_library">
            <div class="name">
                <!-- <a href="./companies.html">B2B Data</a> -->
            </div>
        </div>
        <div class="item">
            <div class="name">
                <!-- <a class="" href="./market.html">
                        Analysis </a> -->
            </div>
        </div>
        <div class="item">
            <div class="name">
                <!-- <a class="" href="./BtoBInquiry.html">
                        Leads </a> -->
            </div>
        </div>
        <div class="item">
            <div class="name">
            </div>
        </div>
        <div class="item">
            <div class="name">
            </div>
        </div>
    </div>
    <div class="member">
        <!--未登录前-->
        <a class="login no_login" href="./login.html">登录</a>
        <a class="register no_login" href="./register.html" target="_blank">注册</a>
    </div>
</div>
<div class="mobile_fixed_menu">
    <div class="close"></div>
    <div class="logo">
        <a href="javascript:;">
            <img src="{{ asset('web/picture/logo.svg') }}" alt="Keepoe" />
        </a>
    </div>
    <div class="nav">
        <div class="item clue_list">
            <div class="name">
                <a href="/buyer"> Buyers </a>
            </div>
        </div>
        <div class="item clue_list">
            <div class="name">
                <a href="/supplier"> Suppliers </a>
            </div>
        </div>
        <div class="item">
            <div class="name">
                <a href="/trade">
                    <span> Trade Data </span>
                </a>
            </div>
        </div>
        <div class="item">
            <div class="name">
                <a href="/market"> Analysis </a>
            </div>
        </div>
        <div class="item">
            <div class="name">
                <a href="/price">
                    <span> Price </span>
                </a>
            </div>
        </div>
        <div class="item">
            <div class="name">
                <a href="/reviews"> Reviews </a>
            </div>
        </div>
        <div class="item">
            <div class="name">
                <a href="javascript:;"> English </a>
            </div>
        </div>
    </div>
    <div class="member">
        <a class="register" href="javascript:;"> Use Now </a>
        <a class="account" href="/account">Membership Center </a>
    </div>
</div>
<script>
    $(function () {
        $("#header .member .login").on("click", function () {
            window.location.href = "/login.html";
        });
    });
</script>
<script src="{{ asset('web/js/moment.min.js') }}"></script>
<script src="{{ asset('web/js/daterangepicker.js') }}"></script>
<link href="{{ asset('web/css/daterangepicker.css') }}" rel="stylesheet" type="text/css" />

<input name="id" type="hidden" value="54a116cc69702d3ec0030000" />
<!-- <link href="static/css/pagination.css" rel="stylesheet" type="text/css" /> -->
<link href="{{ asset('web/css/flag_1.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('web/css/companies-detail.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('web/css/jquery.orgchart.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('web/css/toastr.css') }}" rel="stylesheet" type="text/css" />
<script src="{{ asset('web/js/jquery.pagination.js') }}"></script>
<script src="{{ asset('web/js/highcharts-1.00030-269.js') }}"></script>
<script src="{{ asset('web/js/highcharts-zh_cn.js') }}"></script>
<script src="{{ asset('web/js/userchart.js') }}"></script>
<script src="{{ asset('web/js/html2canvas.js') }}"></script>
<script src="{{ asset('web/js/jquery.orgchart.js') }}"></script>
<!--<script src="static/js/companies-detail.js"></script>-->
<!-- <script src="static/js/jquery.bxslider.js"></script> -->
<script src="{{ asset('web/js/toastr.js') }}"></script>

<script src="{{ asset('web/js/ajaxrequest.js') }}"></script>
<script src="{{ asset('web/js/utils.js') }}"></script>
<script src="{{ asset('web/js/loading.js') }}"></script>

<div class="navigation">
    <a href="{{ route('/') }}"> 首页 </a>&nbsp;&gt;&nbsp;<a href="{{ route('/') }}">列表 </a>&nbsp;&gt;&nbsp;<a href="">
        <em> 案件详情</em>
    </a>
</div>

<div class="detail_top_title trade_top_title">
    <div class="w_1280">
        <div class="detail_top_main" id="headInfo">


            <div class="detail_name">
                <div class="left">
                    <div class="adver"><img src="{{ $info->user->avatar }}" alt=""></div>
                    <div class="name">
                        <h1>{{ $info->title }}</h1>
                    </div>
                </div>
            </div>
            <div class="msg">
                <div class="info">
												<span class="span_item">
													<span class="type">姓名:</span>
													<span class="value">{{ $info->user->name }}</span>
												</span>
                    <span class="span_item">
													<span class="type">提问时间:</span>
													<span
                                                        class="value">{{ $info->created_at }}</span>
												</span>
                    <span class="span_item">
													<span class="type">类型:</span>
													<span class="value">{{ $info->lawOrder->categoryOne->title }}</span>
												</span>
                </div>
                <div class="company_other" style="margin-top: 20px;">
                    {!! $info->content !!}
                </div>
            </div>




        </div>
    </div>
</div>

<div class="detail_main staff bdetail_main">
    <div class="w_1280" style="display: none">
        <div class="switch_card">
            <a href="javascript:;" attr-href="/detail/?id=11f34468d811cd82e55fa23e096f2279&Menu=Data&Card=0" arrt-cid="0"
               class="cur">
                All
            </a>
        </div>
    </div>

    <div class="w_1280">
        <div>
            <div class="box_item menu abs">
                <div class="menu_list">
                    <a href="javascript:;" id="navBase" level="0" bf="deglobal" class="cur">律师回复</a>
                    <a href="javascript:;" id="navWenti" level="0">常见问题</a>
                </div>
            </div>

            <div class="box_item pb30" id="base">
                <div class="ai_outbox">
                    <div id="mainBusiness">
                        <div>{!! $info->comment->content !!}</div>
                    </div>
                    <div class="bottom">
                        <div class="r">
                            <div class="msg_cont_out">
                                <div class="msg_cont_inner" style="display: block">
                                    <div class="msg_cont" id="businessInformation">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <h3 class="item_title" style="display: none">
                        Shareholder Information
                    </h3>

                    <div class="bottom" style="margin-top: 0; display: none">
                        <div class="r">
                            <div class="table_out">
                                <table class="table" style="display: table">
                                    <thead>
                                    <tr>
                                        <td width="15%" class="nowrap">Shareholder Name</td>

                                        <td width="15%" class="nowrap">Shareholder Type</td>

                                        <td width="25%" class="nowrap">
                                            Contributed Capital
                                        </td>

                                        <td width="15%" class="nowrap">Shareholding Ratio</td>

                                        <td width="15%" class="nowrap">Contribution Date</td>

                                        <td width="15%" class="nowrap">
                                            Number of Associated Enterprises
                                        </td>
                                    </tr>
                                    </thead>

                                    <tbody>
                                    <tr>
                                        <td>Natural Person Shareholders</td>

                                        <td>Legal Representative</td>

                                        <td>12,519,525 RMB</td>

                                        <td>100%</td>

                                        <td>2015-04-10</td>

                                        <td>-</td>
                                    </tr>

                                    <tr>
                                        <td>Natural Person Shareholders</td>

                                        <td>Legal Representative</td>

                                        <td>12,519,525 RMB</td>

                                        <td>100%</td>

                                        <td>2015-04-10</td>

                                        <td>-</td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>

                            <div class="view_afert_login" style="display: none">
                                <div class="right_cont">
                                    <div class="tips_title">
                                        This Company Has a Total of <span>13</span> trade
                                        partners <br />Log In to View
                                    </div>

                                    <div class="tips_btn_info">
                                        <a href="/register.html?IsLevel=1" target="_blank" class="go_register" bf="ovpartner">免费注册</a><a
                                            href="javascript:;" class="go_login" bf="ovpartner">登 录</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- <h3 class="item_title">Technology</h3> -->

                    <div class="bottom">
                        <div class="r">
                            <div class="msg_cont_out">
                                <div class="msg_cont_inner" style="display: block">
                                    <div class="msg_cont" id="technologyBox"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>




            <div class="box_item pb30" id="wenti">
                <div class="hs ai_outbox">
                    <h2 class="box_name">常见问题</h2>

                    <div class="bottom" style="margin-top: 0">
                        <div class="r" style="margin-top: 25px">
                            <div class="q_a_info" style="cursor: pointer;" id="commonProblemBox">

                                @foreach ($list as $item)
                                <div class="q_a_item">
                                    <div class="q_box">
                                        <a href="{{ route('question_details', ['id'=>$item['id']]) }}">{{ $item['title'] }}?</a>
                                    </div>
                                </div>
                                @endforeach

                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>

        <div class="right_side">
            <!-- <div class="box_item first_child has_website">

                    <h2 class="box_name bold">

                        Contact111
                    </h2>

                    <div class="contact_out_out">

                        <div class="contact_out no_click ask_show" id="contactInformationBox">

                        </div>

                        <div class="btn_list new" id="collect-box">

                            <div class="span collect" saving="0" style="width:100%;"> <i></i> <span
                                    class="name">Collection</span> </div>

                        </div>

                    </div>

                </div> -->

            <!-- <div class="box_item pb5 same_company">

                    <div class="box_name">

                        Recommend Company
                    </div>

                    <div class="c_list load_out">

                        <div class="no_data" style="display: none">

                            <div class="loading_gif">

                            </div>

                        </div>

                        <div class="recommended-companies" id="recommendedCompanies">



                        </div>

                    </div>

                </div> -->
        </div>

        <div class="clear"></div>
    </div>
</div>

<script>
    // 收藏选中的id集合

    let selectCollectId = [];

    // 收藏选中的邮箱集合

    let selectCollectEmail = [];

    $(function () {
        // const enterpriseId = getURLParameter("enterprise_id");

        const enterpriseId = getUrlLastParam();

        handleGetManageLists();

        handleGetDepartmentLists();

        handleGetRecommendEnterpriseList(enterpriseId);

        handleGetEnterpriseSuperiorAndSubordinate(enterpriseId);

        handleCompanyStaff(enterpriseId, {});

        handleGetEmployeeMetricsDepartmentTotal(enterpriseId);

        handleGetEmployeeMetricsAllTotal(enterpriseId);

        handleGetEmployeeMetricsReserveTotal(enterpriseId);

        handleGetEnterpriseFundingEventsList(enterpriseId);

        $(".language_box").on("hover", function () {
            $(this).find(".language_select").toggle();
        });

        $("#header .btn_list dl dd .dd_out").on(
            "click",
            "a.upgrade",
            function () {
                if ($("#AccountId").val()) {
                    themes_obj.upgradeBox("upgrade", "initiative");

                    return false;
                }
            }
        );

        $(".detail_main .box_item .menu_list a").on("click", function () {
            $(this).addClass("cur").siblings().removeClass("cur");
        });

        $(".trade_top_title .flex_info").on("click", function () {
            if ($(this).hasClass("open_info")) {
                $(this).addClass("close_info");

                $(this).removeClass("open_info");

                $(this).parents(".info").addClass("intro_show");

                $(this).html('收起<i class="iconfont icon-xiangyoujiantou"></i>');
            } else {
                $(this).removeClass("close_info");

                $(this).addClass("open_info");

                $(this).parents(".info").removeClass("intro_show");

                $(this).html('展开<i class="iconfont icon-xiangyoujiantou"></i>');
            }
        });

        $("#navBase").on("click", function () {
            // 基本信息

            $("html,body").animate(
                {
                    scrollTop: $("#base").offset().top - 30,
                },
                200
            );
        });

        $("#navUser").on("click", function () {
            // 公司员工

            $("html,body").animate(
                {
                    scrollTop: $("#user").offset().top - 30,
                },
                200
            );

            //  handleGetManageLists()

            //  handleGetDepartmentLists()

            //  handleCompanyStaff(enterpriseId, {})
        });

        // 企业图谱
        $("#navTupu").on("click", function () {
            $("html,body").animate(
                {
                    scrollTop: $("#tupu").offset().top - 30,
                },
                200
            );

            //  handleGetEnterpriseSuperiorAndSubordinate(enterpriseId)
        });

        $("#navDongtai").on("click", function () {
            // 人员动态

            $("html,body").animate(
                {
                    scrollTop: $("#dongtai").offset().top - 30,
                },
                200
            );

            //  handleGetEmployeeMetricsDepartmentTotal(enterpriseId)

            //  handleGetEmployeeMetricsAllTotal(enterpriseId)

            //  handleGetEmployeeMetricsReserveTotal(enterpriseId)
        });

        $("#navFazhan").on("click", function () {
            // 融资发展

            $("html,body").animate(
                {
                    scrollTop: $("#fazhan").offset().top - 30,
                },
                200
            );

            //  handleGetEnterpriseFundingEventsList(enterpriseId)
        });

        // 常见问题
        $("#navWenti").on("click", function () {
            $("html,body").animate(
                {
                    scrollTop: $("#wenti").offset().top - 30,
                },
                200
            );
        });

        let isRenyuandongtai = true;

        let isGongsiyuangong = true;

        let isRongzhifazhan = true;

        let isTupu = true;

        $(window).scroll(function () {
            var len = $(window).scrollTop();

            var lenA = $("#user").offset().top - 50;

            var lenB = $("#tupu").offset().top - 50;

            var lenC = $("#dongtai").offset().top - 50;

            var lenD = $("#fazhan").offset().top - 50;

            var lenE = $("#wenti").offset().top - 50;

            // var lenF = $('#wenti').offset().top - 50;

            if (len < lenA) {
                $("#navBase").addClass("cur");

                $(
                    "#navUser, #navTupu, #navDongtai, #navFazhan, #navWenti"
                ).removeClass("cur");
            } else if (len >= lenA && len < lenB) {
                $("#navUser").addClass("cur");

                $(
                    "#navBase, #navTupu, #navDongtai, #navFazhan, #navWenti"
                ).removeClass("cur");

                if (isGongsiyuangong) {
                    // handleGetManageLists()
                    // handleGetDepartmentLists()
                    // handleCompanyStaff(enterpriseId, {})
                }

                isGongsiyuangong = false;
            } else if (len >= lenB && len < lenC) {
                $("#navTupu").addClass("cur");

                $(
                    "#navBase, #navUser, #navDongtai, #navFazhan, #navWenti"
                ).removeClass("cur");

                if (isTupu) {
                    // handleGetEnterpriseSuperiorAndSubordinate(enterpriseId)
                }

                isTupu = false;
            } else if (len >= lenC && len < lenD) {
                $("#navDongtai").addClass("cur");

                $(
                    "#navBase, #navUser, #navTupu, #navFazhan, #navWenti"
                ).removeClass("cur");

                if (isRenyuandongtai) {
                    // handleGetEmployeeMetricsDepartmentTotal(enterpriseId)
                    // handleGetEmployeeMetricsAllTotal(enterpriseId)
                    // handleGetEmployeeMetricsReserveTotal(enterpriseId)
                }

                isRenyuandongtai = false;
            } else if (len >= lenD && len < lenE) {
                $("#navFazhan").addClass("cur");

                $(
                    "#navBase, #navUser, #navTupu, #navDongtai, #navWenti"
                ).removeClass("cur");

                if (isRongzhifazhan) {
                    // handleGetEnterpriseFundingEventsList(enterpriseId)
                }

                isRongzhifazhan = false;
            } else if (len >= lenE) {
                $("#navWenti").addClass("cur");

                $(
                    "#navBase, #navUser, #navTupu, #navDongtai, #navFazhan"
                ).removeClass("cur");
            }
        });

        $(".detail_main .left_side .box_item .show_all").on(
            "click",
            function () {
                if ($(this).text() == "展开") {
                    $(this).html('收起<i class="iconfont icon-xiangyoujiantou"></i>');

                    $(this).addClass("cur");

                    $(this).parents(".data").next(".box_info").css("height", "auto");
                } else {
                    $(this).html('展开<i class="iconfont icon-xiangyoujiantou"></i>');

                    $(this).removeClass("cur");

                    $(this).parents(".data").next(".box_info").css("height", "90px");
                }
            }
        );

        $(".detail_main.staff .box_item .bottom .table .box_icon").on(
            "hover",
            function () {
                $(this).find(".box_info").toggle();
            }
        );

        $(".detail_main .box_item .high_search_user .item").on(
            "click",
            function (even) {
                $(this).find(".item_drop").toggle();

                $(this).parents(".label").siblings().find(".item_drop").hide();

                event.stopPropagation();
            }
        );

        // $('.detail_main .box_item .high_search_user .item_drop,.detail_main .box_item .high_search_user .item_drop .check_item input').on("click",function(){

        // 	event.stopPropagation();

        // })

        $(".detail_main .box_item .high_search_user .item_drop .check_item").on(
            "click",
            function (even) {
                $(this).next("ul").slideToggle();

                $(this).toggleClass("cur");

                event.stopPropagation();
            }
        );

        $(document).on("click", function (e) {
            if (
                $(e.target).closest(
                    ".detail_main .box_item .high_search_user .item"
                ).length == 0 &&
                $(e.target).closest(
                    ".detail_main .box_item .high_search_user .item_drop"
                ).length == 0
            ) {
                $(".detail_main .box_item .high_search_user .item_drop").hide();

                $(
                    ".detail_main .box_item .high_search_user .item_drop .list .check_item"
                ).removeClass("cur");
            }
        });

        // $('.detail_main .box_item .high_search_user .item_drop .check_all label').on("click",function(){

        //     event.stopPropagation();

        //     if($(this).find('input[type="checkbox"]')[0].checked){

        //         // 全选

        //         $(this).parents('.check_all').next('ul').find('input[type="checkbox"]').prop("checked",true);

        //     }else{

        //         //全不选

        //         $(this).parents('.check_all').next('ul').find('input[type="checkbox"]').prop("checked",false);

        //     }

        // })

        // $('.item_drop .check_item label').on("click",function(){

        //     if($(this).find('input[type="checkbox"]')[0].checked){

        //         $(this).find('input[type="checkbox"]').prop("checked",true);

        //     }else{

        //         $(this).find('input[type="checkbox"]').prop("checked",false);

        //     }

        //     var result="";

        //     $("input[name='predefineCheckbox']:checked").each(function(){

        //         result+=$(this).val()+',';

        //     });

        //     if(result!=""){

        //         result=result.substring(0,result.lastIndexOf(','));

        //     }

        //     $('#glInput').val(result);

        //     var result2="";

        //     $("input[name='devepmentSelect']:checked").each(function(){

        //         result2+=$(this).val()+',';

        //     });

        //     if(result2!=""){

        //         result2=result2.substring(0,result2.lastIndexOf(','));

        //     }

        //     $('#devepmentInput').val(result2);

        // })

        $(".item_drop .list ul .check_item:not(.check_all) label").on(
            "click",
            function () {
                // $(this).find('input[type="checkbox"]').prop("checked",true);

                var a =
                    $(this).parents(".list").find('input[type="checkbox"]').length -
                    1;

                var b = $(this)
                    .parents(".list")
                    .find(
                        '.check_item:not(.check_all) input[type="checkbox"]:checked'
                    ).length;

                if (a === b) {
                    $(this)
                        .parents(".list")
                        .find('.check_all input[type="checkbox"]')
                        .prop("checked", true);
                } else {
                    $(this)
                        .parents(".list")
                        .find('.check_all input[type="checkbox"]')
                        .prop("checked", false);
                }
            }
        );

        $(".detail_main .no_website .btn_list.new .span:first-child").on(
            "click",
            function () {
                $(".new_dig_box").addClass("cur");

                $(".div_mask").show();

                $(".new_dig_box .title span").html(
                    "<span>Get Contact Information</span>"
                );

                $(".new_dig_box .show_cont")
                    .removeClass("show_3")
                    .addClass("show_1");

                $(".new_dig_box .show_cont .type_1").show();

                $(".new_dig_box .show_cont .type_3").hide();
            }
        );

        $(".new_dig_box .show_cont .type_1 .btns.dig").on("click", function () {
            $(".new_dig_box .title span").html(
                "<span> Discovered<em>13</em>Contact Methods</span>"
            );

            $(".new_dig_box .show_cont").removeClass("show_1").addClass("show_3");

            $(".new_dig_box .show_cont .type_1").hide();

            $(".new_dig_box .show_cont .type_3").show();
        });

        $(".new_dig_box .title .close,.div_mask").on("click", function () {
            $(".new_dig_box").removeClass("cur");

            $(".div_mask").hide();
        });

        $(".new_dig_box .show_cont .btm_abs .back").on("click", function () {
            $(".new_dig_box .show_cont").removeClass("show_3").addClass("show_1");

            $(".new_dig_box .show_cont .type_1").show();

            $(".new_dig_box .show_cont .type_3").hide();
        });

        $(".view_contact_info_box .bot_out .rows_box a.view_all").on(
            "click",
            function () {
                $(".global_alert_upgrade").addClass("cur");
            }
        );

        $(".detail_main .btn_list.new .collect").on("click", function () {
            if ($(this).attr("saving") == 0) {
                $(this).attr("saving", "1");

                $(this).find("span").html("Favorited");
            } else {
                $(this).attr("saving", "0");

                $(this).find("span").html("Collection");
            }
        });

        var div_li = $(".view_contact_info_box .detail_alert .menu_left a");

        div_li.on("click", function () {
            $(this).addClass("cur").siblings().removeClass("cur");

            var div_index = div_li.index(this);

            $(".view_contact_info_box .bot_out")
                .eq(div_index)
                .show()
                .siblings()
                .hide();
        });

        $("#header .btn_list dl dd .dd_out .top .upgrade_btn").on(
            "click",
            function () {
                let _thisVersion = $(this).data("version");

                _thisVersion = _thisVersion ? _thisVersion : "";

                themes_obj.upgradeBox("upgrade", "initiative", _thisVersion);
            }
        );

        $(".account_box .menu_box label").on("click", function () {
            $(".account_box .menu_box label").removeClass("cur");

            $(this).addClass("cur");

            let this_index = $(this).index();

            $(".account_box .rows_box .rows.change")
                .find(".l")
                .each(function () {
                    if ($(this).index() == this_index) {
                        $(this).removeClass("hide");

                        $(this).find("input").attr("notnull", "notnull");
                    } else {
                        $(this).addClass("hide");

                        $(this).find("input").val("").removeAttr("notnull");
                    }
                });
        });

        //关闭登录弹窗

        $(".user_login_box .close").on("click", function () {
            if (!$(".main_list .left_side").hasClass("current"))
                global_obj.div_mask(1);

            $(".user_login_box").hide();
        });

        //优化弹窗-清晰引导注册

        //关闭优化弹窗

        $(".member_reminder_box .close,.member_reminder_box .btn_know").on(
            "click",
            function () {
                if (!$(".main_list .left_side").hasClass("current"))
                    global_obj.div_mask(1);

                $(".member_reminder_box").hide();
            }
        );

        //点击唤醒登录

        $(".member_reminder_box .account_box .rows_box .btn_submit").on(
            "click",
            function () {
                $(".member_reminder_box").hide();

                $(".user_login_box").show();
            }
        );

        //点击跳转注册

        $(".member_reminder_box .account_box .rows_box .btn_register").on(
            "click",
            function () {
                window.location.href = "register.html";
            }
        );

        //优惠弹窗-清晰引导注册

        //没有数据的企业，点击关闭/遮罩层 跳往上一页

        $("html").on(
            "click",
            "#enterprise_data_mask,.enterprise_data_box .close",
            function () {
                window.close();

                window.location.href = "/";
            }
        );

        //没有数据的企业，点击关闭/遮罩层 跳往上一页

        //登录框、注册框、按钮变色

        $(".reg_input").each(function () {
            let register_btn_flag = false;

            if ($(this).val().length != 0) {
                register_btn_flag = true;
            }

            $(this).on("input", "", function () {
                $(this).css({
                    border: "2px solid #045afe",
                    color: "#222222",
                });

                if ($(this).next(".input_tips").length) {
                    $(this).next(".input_tips").hide();
                }

                if ($(this).val().length == 0) {
                    register_btn_flag = false;

                    $(this).css({
                        border: "1px solid #eeeeee",
                        color: "#a0a0a0",
                    });

                    $(".reg_input").each(function () {
                        if ($(this).val().length > 0 && !register_btn_flag) {
                            register_btn_flag = true;
                        }
                    });
                } else {
                    register_btn_flag = true;
                }

                if (register_btn_flag) {
                    $(".btn_submit")
                        .removeAttr("disabled")
                        .removeClass("btn_disabled")
                        .addClass("btn_no_disabled");
                } else {
                    $(".btn_submit")
                        .attr("disabled", "disabled")
                        .removeClass("btn_no_disabled")
                        .addClass("btn_disabled");
                }
            });

            $(this).on("change", "", function () {
                $(this).css("border", "1px solid #eeeeee");
            });
        });

        //图片懒加载

        $("img.lazy").lazyload({
            effect: "fadeIn",
        });

        //第一版

        img_lazy();

        //其他版

        $(window).on("scroll", function () {
            img_lazy();
        });

        function img_lazy() {
            $("img.lazy").each(function () {
                var top = $(this).offset().top;

                if (top < $(window).scrollTop() + $(window).height()) {
                    $(this).attr("src", $(this).attr("data-original"));

                    $(this).removeClass("lazy");
                }
            });
        }

        //图片懒加载

        // 获取地址栏参数

        // const enterprise_id = getURLParameter("enterprise_id");
        const enterprise_id = getUrlLastParam();

        // 获取详情

        getDetail(enterprise_id);
    });

    // 详情接口获取数据

    async function getDetail(enterprise_id) {
        try {
            // noConntenLoading("#headInfo", 190);

            // noConntenLoading("#mainBusiness", 190);

            // noConntenLoading("#businessInformation", 120);

            // noConntenLoading("#technologyBox", 120);

            // noConntenLoading("#commonProblemBox", 250);

            contactInformationLoading("#contactInformationBox", 265);

            const { code, data } = await getEnterpriseDetail({
                enterprise_id,
            });

            if (String(code) === "1" && data) {
                const { enterprise } = data;

                const keywordList = enterprise.keywords
                    ?.split(",")
                    ?.filter((item) => item);
                const technologyList = enterprise.technology_names
                    ?.split(",")
                    ?.filter((item) => item);

                // 头部信息

                $("#headInfo").html(`
									 	<div class="detail_name">
											<div class="left">
												<div class="adver"><img src="{{ asset('web/image/picture.png') }}'}" alt=""></div>
												<div class="name">
													<h1>${enterprise.name}</h1>
												</div>
											</div>
										</div>
										<div class="msg">
											<div class="info">
												<span class="span_item">
													<span class="type">姓名:</span>
													<span class="value">${enterprise.founded_year || "-"}</span>
												</span>
												<span class="span_item">
													<span class="type">下单时间:</span>
													<span class="value">${enterprise.estimated_num_employees || 0}</span>
												</span>
												<span class="span_item">
													<span class="type">类型:</span>
													<span class="value">$${enterprise.annual_revenue || "-"}</span>
												</span>
											</div>
											<div class="info company_other">
												<span class="span_item">
													<span class="type"></span>
													<span class="value">${enterprise.raw_address || "-"}</span>
												</span>
											</div>
										</div>
									 `);

                $(".trade_top_title .flex_info").on("click", function () {
                    if ($(this).hasClass("open_info")) {
                        $(this).addClass("close_info");

                        $(this).removeClass("open_info");

                        $(this).parents(".info").addClass("intro_show");

                        $(this).html(
                            'Collapse<i class="iconfont icon-xiangyoujiantou"></i>'
                        );
                    } else {
                        $(this).removeClass("close_info");

                        $(this).addClass("open_info");

                        $(this).parents(".info").removeClass("intro_show");

                        $(this).html(
                            'Expand<i class="iconfont icon-xiangyoujiantou"></i>'
                        );
                    }
                });

                // Main Business
                $("#mainBusiness").html(`<div>案件类型展示字符串</div>`);

                $(".detail_main .left_side .box_item .show_all").on(
                    "click",
                    function () {
                        if ($(this).text() == "Expand") {
                            $(this).html(
                                'Collapse<i class="iconfont icon-xiangyoujiantou"></i>'
                            );

                            $(this).addClass("cur");

                            $(this)
                                .parents(".data")
                                .next(".box_info")
                                .css("height", "auto");
                        } else {
                            $(this).html(
                                'Expand<i class="iconfont icon-xiangyoujiantou"></i>'
                            );

                            $(this).removeClass("cur");

                            $(this)
                                .parents(".data")
                                .next(".box_info")
                                .css("height", "90px");
                        }
                    }
                );

                // 技术

                $("#technologyBox").html(`

										${technologyList

                    ?.map((litem) => {
                        return `<div class="copy">

													<div class="name">

														${litem}

													</div>

													<div class="val add_tips_1">

														${litem}

													</div>

												</div>`;
                    })

                    .join("")}



									`);

                // 工商信息

                $("#businessInformation").html(`

										<div class="copy">

											<div class="name">

												Company Type
											</div>

											<div class="val">

												${enterprise.publicly_traded_symbol ||
                enterprise.publicly_traded_exchange
                    ? "Public Company"
                    : "Private Company"
                }

											</div>

										</div>

										<div class="copy">

											<div class="name">

												Country
											</div>

											<div class="val">

												${enterprise.country || "-"}

											</div>

										</div>

										<div class="copy">

											<div class="name">

												Operating Status
											</div>

											<div class="val">

												Active
											</div>

										</div>

										<div class="copy">

											<div class="name">

												Year Founded
											</div>

											<div class="val ">

												${enterprise.founded_year || "-"}

											</div>

										</div>

										<div class="copy">

											<div class="name">

												Number of Employees
											</div>

											<div class="val ">

												${enterprise.estimated_num_employees || 0}

											</div>

										</div>

										<div class="copy">

											<div class="name">

												Revenue
											</div>

											<div class="val">

												${enterprise.annual_revenue || "-"}

											</div>

										</div>

										<div class="copy" style="width: 100%">

											<div class="name">

												Stock Code
											</div>

											<div class="val">

												-

											</div>

										</div>

										<div class="copy" style="width: 100%">

											<div class="name">

												Business Nature (SIC)
											</div>

											<div class="val">

												-

											</div>

										</div>

										<div class="copy" style="width: 100%">

											<div class="name">

												Business Address
											</div>

											<div class="val ">

												${enterprise.raw_address || "-"}

											</div>

										</div>

										<div class="copy" style="width: 100%">

											<div class="name">

												Company Overview
											</div>

											<div class="val">

												${enterprise.short_description || "-"}

											</div>

										</div>

									`);

                // Contact
                $("#contactInformationBox").html(`

										<div class="copy lx_copy" style="flex-wrap: wrap;">

							        	<span>Email/Phone/Website</span>

							            <div class="clear" style="width: 100%;"></div>

							            <div class="box" id="contactInformation">

							            	<div class="item">

												<span title="${enterprise.phone || ""}">

													<a href="javascript:;">

														<i class="iconfont icon-lianxi"></i>

														<em>${enterprise.phone || "-"}</em>

													</a>

												</span>



											</div>

											<div class="item">

												<span title="${enterprise.email || ""}">

													<a href="javascript:;"><i class="iconfont icon-youxiang"></i>

														<em>${enterprise.email || "-"}</em>

													</a>

												</span>



											</div>

											<div class="item">

												<span title="${enterprise.website_url || ""}">

													<a href="javascript:;"><i class="iconfont icon-wangzhi"></i>

														<em>${enterprise.website_url || "-"}</em>

													</a>

												</span>



											</div>



							            </div>

							            <p class="p1"><a href="${enterprise.email
                    ? `/email-SendMail.html?emails=${enterprise.email}`
                    : "javascipt:;"
                }" class="button">发邮件</a></p>

							        </div>

							        <div class="copy" style="flex-wrap: wrap;">

							        	<span>Social Media</span>

							            <div class="clear" style="width: 100%;"></div>

							            <div class="blank6"></div>

							            <span style="display: flex;flex-wrap: wrap;justify-content: space-between;align-content: center;" id="socialMediaBox">

							            	${enterprise.facebook_url
                    ? `<a href="${enterprise.facebook_url || "javascript:;"
                    }" class="share facebook"><span>Facebook</span></a>`
                    : ""
                }

											${enterprise.linkedin_url
                    ? `<a href="${enterprise.linkedin_url || "javascript:;"
                    }" class="share linkedin"><span>Linkedin</span></a>`
                    : ""
                }

											${enterprise.twitter_url
                    ? `<a href="${enterprise.twitter_url || "javascript:;"
                    }" class="share twitter"><span>Twitter</span></a>`
                    : ""
                }

							            </span>

							        </div>

									`);

                // Favorite Value
                $("#collect-box").html(`

										<div

											class="span collect"

											saving="${enterprise.is_collect ? "1" : "0"}"

											style="width: 100%"

											id="collectBox"



										>

											<i></i> <span class="name">${enterprise.is_collect ? "Favorited" : "Collection"
                }</span>

										</div>



									`);

                // FAQ
                $("#commonProblemBox").html(
                    `

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;What is ` +
                    enterprise.name +
                    `'s location?<i class="iconfont icon-xiangyoujiantou"></i>
											</div>
											<div class="a_box">` +
                    enterprise.name +
                    `'s head office is located in ` +
                    enterprise.raw_address +
                    `</div>
										</div>
										<div class="q_a_item">
											<div class="q_box">
												Q&nbsp;&nbsp;&nbsp;What is ` +
                    enterprise.name +
                    `'s phone number?<i class="iconfont icon-xiangyoujiantou"></i>
											</div>
											<div class="a_box">` +
                    enterprise.name +
                    `'s phone number is ${enterprise.phone}</div>
										</div>
										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;What is ` +
                    enterprise.name +
                    `'s official website??<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">` +
                    enterprise.name +
                    `'s official company website is: ${enterprise.website_url}</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;What does ` +
                    enterprise.name +
                    ` do??<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">` +
                    enterprise.name +
                    ` is involved in ${enterprise.short_description}</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;What are ` +
                    enterprise.name +
                    `'s business areas?<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">${enterprise.keywords}</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;What is ` +
                    enterprise.name +
                    `'s annual revenue?<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">` +
                    enterprise.name +
                    `'s annual revenue is${enterprise.annual_revenue}USD</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;How many employees does ` +
                    enterprise.name +
                    ` have?<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">` +
                    enterprise.name +
                    ` has ` +
                    enterprise.estimated_num_employees +
                    ` employees</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;Which industry does ` +
                    enterprise.name +
                    ` belong to?<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">` +
                    enterprise.name +
                    ` operates in the following industries: ${enterprise.industries}</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;What technology does ` +
                    enterprise.name +
                    ` use?<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">Some popular technologies used by ` +
                    enterprise.name +
                    ` include: ${enterprise.technology_names}</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;How can I contact ` +
                    enterprise.name +
                    `?<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">` +
                    enterprise.name +
                    `'s contact information -> Phone number:${enterprise.phone || ""
                    }， Website:${enterprise.website_url || ""}， Email：${enterprise.email || ""
                    }</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;What are ` +
                    enterprise.name +
                    `'s social media links?<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">` +
                    enterprise.name +
                    `'s LinkedIn:${enterprise.linkedin_url || ""},fackbook：${enterprise.facebook_url || ""
                    }</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;Is ` +
                    enterprise.name +
                    ` a public company?<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">${enterprise.name} ${enterprise.publicly_traded_symbol ||
                    enterprise.publicly_traded_exchange
                        ? "Yes"
                        : "No"
                    }</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;When was ` +
                    enterprise.name +
                    `'s last funding round?<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">` +
                    enterprise.name +
                    ` completed its last funding round in -, with an amount of -</div>

										</div>

										<div class="q_a_item">

											<div class="q_box">

												Q&nbsp;&nbsp;&nbsp;Who invested in ` +
                    enterprise.name +
                    `?<i class="iconfont icon-xiangyoujiantou"></i>

											</div>

											<div class="a_box">` +
                    enterprise.name +
                    ` has - investors, including、。</div>

										</div>

									`
                );

                $(".bdetail_main .box_item .bottom .q_a_item").on(
                    "click",
                    function () {
                        $(this).toggleClass("cur");

                        $(this).find(".a_box").slideToggle();
                    }
                );
            } else {
                hideNoConntenLoading();

                hideRightSmallModuleLoading();

                hideContactInformationLoading();
            }

            // 收藏

            $("#collectBox").on("click", async (e) => {
                // const enterpriseId = getURLParameter("enterprise_id");
                const that = $("#collectBox");
                const params = {
                    collect_ids: enterprise_id,
                };

                try {
                    const { code, msg, data } = await enterpriseCollect(params);

                    if (String(code) === "1") {
                        if (data) {
                            if (that.attr("saving") == 0) {
                                that.attr("saving", "1");

                                that.find("span").html("Favorited");
                            } else {
                                that.attr("saving", "0");

                                that.find("span").html("Collection");
                            }
                        }
                    }
                } catch (error) {
                    console.log("employee_collectAPI", error);
                }

                // const params = { enterprise_id: enterpriseId };

                // console.log(params)

                // try {

                // const { code, msg, data } = await userEnterpriseCollect(params);

                // if (String(code) === "1") {

                // 	getDetail(enterpriseId);

                // }

                // } catch (error) {

                // console.log("user_employee_collect接口", error);

                // }
            });
        } catch (error) {
            console.log("get_enterprise_detail接口", error);
        }
    }

    // 人员动态-部门

    async function handleGetEmployeeMetricsDepartmentTotal(enterprise_id) {
        try {
            noConntenLoading("#departmentTotalTable", 190);

            const { code, data } = await getEmployeeMetricsDepartmentTotal({
                enterprise_id,
            });

            if (String(code) === "1" && data) {
                $("#departmentTotal").html(`

								<div class="big_val">

									${data?.length}

								</div>

								<div class="big_name">

									部门总量

								</div>

							`);

                $("#departmentTotalTable").html(`

								${data
                    ?.map((item) => {
                        return `<tr>

											<td><em></em>${item.title || ""}</td>

											<td class="nowrap"><i class="iconfont icon-xiala"></i>${item.yearOne || "0"
                        }</td>

											<td class="nowrap"><i class="iconfont icon-xiala"></i>${item.yearTwo || "0"
                        }</td>

										</tr>

										`;
                    })

                    .join("")}



							`);

                countryUserChart(data);

                if (
                    zuoooo_config.Permit.ability.indexOf("personnel_dynamics") === -1
                ) {
                    $("#departmentTotalTable").parent("table").addClass("no_view");
                    if ($("#AccountId").val() == 0) {
                        $(".enterprise_department_total").text(data?.length);
                        $(
                            ".enterprise_department.no_view_tip_box.no_login_static"
                        ).show();
                        $(".enterprise_department.no_view_tip_box.upgrade").hide();
                    } else {
                        $(
                            ".enterprise_department.no_view_tip_box.no_login_static"
                        ).hide();
                        $(".enterprise_department.no_view_tip_box.upgrade").show();
                    }
                }
            }
        } catch (error) {
            console.log("get_employee_metrics_department_total接口", error);
        }
    }

    // 人员动态-部门-总数

    async function handleGetEmployeeMetricsAllTotal(enterprise_id) {
        try {
            noConntenLoading("#sumChart", 200);

            const { code, data } = await getEmployeeMetricsAllTotal({
                enterprise_id,
            });

            if (String(code) === "1" && data) {
                const { count_list = [], date_list = [], list = [] } = data;

                $("#totalStatistics").html(`

								${count_list
                    ?.map((item) => {
                        return `<div class="copy">

											<div class="name">

											${item.name}

											</div>

											<div class="val">

												${item.num}

											</div>

										</div>

										`;
                    })

                    .join("")}`);

                totalFunc(date_list, list);

                if (
                    zuoooo_config.Permit.ability.indexOf("personnel_dynamics") === -1
                ) {
                    $("#sumChart")
                        .parent(".report.trend")
                        .parent(".ai_replace")
                        .addClass("no_view");
                    if ($("#AccountId").val() == 0) {
                        $(
                            ".enterprise_department_all_total.no_view_tip_box.no_login_static"
                        ).show();
                        $(
                            ".enterprise_department_all_total.no_view_tip_box.upgrade"
                        ).hide();
                    } else {
                        $(
                            ".enterprise_department_all_total.no_view_tip_box.no_login_static"
                        ).hide();
                        $(
                            ".enterprise_department_all_total.no_view_tip_box.upgrade"
                        ).show();
                    }
                }
            }
        } catch (error) {
            console.log("get_employee_metrics_all_total接口", error);
        }
    }

    // 人员动态-部门-保留

    async function handleGetEmployeeMetricsReserveTotal(enterprise_id) {
        try {
            noConntenLoading("#holdChart", 200);

            const { code, data } = await getEmployeeMetricsReserveTotal({
                enterprise_id,
            });

            if (String(code) === "1" && data) {
                const {
                    churned_list = [],
                    date_list = [],
                    new_list = [],
                    retained_list = [],
                } = data;

                // $('#retainStatistics').html(``)

                const datalist = [
                    {
                        name: "新增",

                        data: new_list?.map(Number),
                    },

                    {
                        name: "保留",

                        data: retained_list?.map(Number),
                    },

                    {
                        name: "变动",

                        data: churned_list?.map(Number),
                    },
                ];

                retainFunc(date_list, datalist);

                if (
                    zuoooo_config.Permit.ability.indexOf("personnel_dynamics") === -1
                ) {
                    $("#holdChart")
                        .parent(".report.trend")
                        .parent(".ai_replace")
                        .addClass("no_view");
                    if ($("#AccountId").val() == 0) {
                        $(
                            ".enterprise_department_reserve.no_view_tip_box.no_login_static"
                        ).show();
                        $(
                            ".enterprise_department_reserve.no_view_tip_box.upgrade"
                        ).hide();
                    } else {
                        $(
                            ".enterprise_department_reserve.no_view_tip_box.no_login_static"
                        ).hide();
                        $(
                            ".enterprise_department_reserve.no_view_tip_box.upgrade"
                        ).show();
                    }
                }
            }
        } catch (error) {
            console.log("get_employee_metrics_reserve_total接口", error);
        }
    }

    // 公司员工

    async function handleCompanyStaff(enterprise_id, paramsList, page = 1) {
        let params = {
            seniority_screen_val: "",

            department_screen_val: "",

            enterprise_id: enterprise_id,

            have_email: 0,

            have_mobile: 0,

            page: page,

            ...paramsList,
        };

        try {
            showLoading("#enterpriseEmployeeTable", "table");

            const { code, data } = await getEnterpriseEmployeeList(params);

            if (String(code) === "1" && data) {
                const {
                    last_page = 0,
                    list = [],
                    total = 0,
                    pageInfo = null,
                } = data;

                $("#enterpriseEmployeeTotal").html(`

								共计 <span>${total || 0} </span> 条员工数据

							`);

                $("#enterpriseEmployeeTable").html("");

                if (list?.length > 0) {
                    hideLoading();
                    let hideRecodeClass = "";
                    $.each(list, (index, item) => {
                        if (index >= zuoooo_config.Permit.limits.enterprise_employee) {
                            hideRecodeClass = "no_view";
                        }
                        $("#enterpriseEmployeeTable").append(`

									<tr class="${hideRecodeClass}">

									<td class="normal">

										<div class="selector">

										<input

											type="checkbox"

											name="select"

											value="${item.id}"
                                            data-email="${item.email || ""}"
										/>

										</div>

									</td>

									<td class="normal nowrap">

										<div class="user">

										<div class="avatar">

											<img src="${item.logo || "/assets/site_resource/image/user.png"}" alt="" />

										</div>

										<div class="info">

											<p>

											<a href="${item.url || "javascript:;"}">${item.name}</a>

											</p>

											<p>

											<a href="${item.facebook_url || "javascript:;"}">

												<img

													src='/assets/site_resource/image/${item.facebook_url ? "fackbook2" : "facebook"
                        }.png'

													alt=""



												/>

											</a>

											<a href="${item.twitter_url || "javascript:;"}">

												<img

													src='/assets/site_resource/image/${item.twitter_url ? "twitter2" : "twitter"
                        }.png'

													alt=""



												/>

											</a>

											<a href="${item.linkedin_url || "javascript:;"}">

												<img

													src='/assets/site_resource/image/${item.linkedin_url ? "in2" : "in"}.png'

													alt=""



												/>

											</a>

											</p>

										</div>

										</div>

									</td>

									<td class="nowrap"  style="max-width: 5%;white-space: normal;">${item.title || "-"
                        }</td>

									<td>

										<div class="box_icon">

										<div class="icons">

											<i class="iconfont icon-youxiang"></i>

											<i class="iconfont icon-dianhua"></i>

										</div>



										<div class="box_info">

											<p>Contact</p>

											<p>

											<i class="iconfont icon-youxiang"></i

											>${item.email || "-"}

											</p>

											<p>

											<i class="iconfont icon-dianhua"></i

											>${item.phone_numbers || "-"}

											</p>

										</div>

										</div>

									</td>

									<td>${item.headline || "-"}</td>

									<td>${item.departments || "-"}</td>

									<td>${item.subdepartments || "-"}</td>

									<td>${item.functions || "-"}</td>

									<td>${item.country || "-"}</td>

									</tr>

								`);
                    });

                    if (
                        zuoooo_config.Permit.ability.indexOf("enterprise_employee") ===
                        -1
                    ) {
                        if ($("#AccountId").val() == 0) {
                            $(".enterprise_employee_total").text(total);
                            $(
                                ".enterprise_employee.no_view_tip_box.no_login_static"
                            ).show();
                            $(".enterprise_employee.no_view_tip_box.upgrade").hide();
                        } else {
                            $(
                                ".enterprise_employee.no_view_tip_box.no_login_static"
                            ).hide();
                            $(".enterprise_employee.no_view_tip_box.upgrade").show();
                        }
                    }

                    $(".detail_main.staff .box_item .bottom .table .box_icon").on(
                        "hover",

                        function () {
                            $(this).find(".box_info").toggle();
                        }
                    );
                } else {
                    hideLoading();
                }

                $("#turn_page").html(pageInfo);
                // $('#list_page').pagination({

                //     pageCount: last_page,

                //     showData: 10,

                //     current: page,

                //     // prevCls: 'page_item_current',

                //     // activeCls: 'page_item_current',

                //     jump: true,

                //     coping: true,

                //     homePage: '首页',

                //     endPage: '末页',

                //     // prevContent: '上一页',

                //     // nextContent: '下一页',

                //     callback: function (api) {

                //         $("#enterpriseEmployeeTable").html("");

                //         handleCompanyStaff(enterprise_id,paramsList, api.getCurrent() )

                //         console.log(api.getCurrent())

                //     }

                // });
            }
        } catch (error) {
            console.log("get_employee_metrics_department_total接口", error);
        }
    }

    // 分页点击

    $("#turn_page,.alert_turn_page").on("click", "a", function () {
        const enterpriseId = getUrlLastParam();
        $("#enterpriseEmployeeTable").html("");
        let page = $(this).data("page");

        if ($(this).parents(".jump").length) {
            page = $('input[name="jump_page"]').val();
            if (
                page == "" ||
                page == undefined ||
                page == "undefined" ||
                isNaN(page) ||
                page <= 0 ||
                page > parseInt($('input[name="jump_page"]').attr("max"))
            ) {
                page = 1;
            }
        }

        $('#search_form input[name="page"]').val(page);
        // listInitParams.page = page;
        handleCompanyStaff(enterpriseId, {}, page);
        return false;
    });

    // 全选

    function handleSelectAll(e) {
        selectCollectId = [];
        selectCollectEmail = [];
        if (!$(".selector_box").hasClass("open")) {
            $("#enterpriseEmployeeTable")
                .children("tr")
                .each(function () {
                    const id = $(this).children().find('input[name="select"]').val();
                    const email = $(this)
                        .children()
                        .find('input[name="select"]')
                        .data("email");
                    selectCollectId.push(id);
                    if (email) {
                        selectCollectEmail.push(email);
                    }
                });
            console.log(selectCollectEmail);
        }
    }

    // 公司员工列表收藏

    async function handleListcollect(mode, that) {
        const params = {
            collect_ids: selectCollectId?.join(","),
        };

        if (selectCollectId) {
            try {
                const { code, msg, data } = await employeeCollect(params);

                if (String(code) === "1") {
                    selectCollectId = [];

                    if (mode === "single") {
                        if (data === true) {
                            if (that) {
                                if (that.hasClass("cancel_save")) {
                                    that.removeClass("cancel_save");
                                    that.addClass("favorite");
                                    that.find("span").html("Collection");
                                } else if (that.hasClass("favorite")) {
                                    that.removeClass("favorite");
                                    that.addClass("cancel_save");
                                    that.find("span").html("Favorited");
                                }
                            }
                        }
                    } else {
                        global_obj.win_alert_auto_close(
                            msg,
                            "success",
                            2000,
                            undefined,
                            0,
                            function () { }
                        );
                    }
                    resetSelection();
                }
            } catch (error) {
                console.log("employee_collect接口", error);
            }
        }
    }

    // 全选--收藏、群发邮件重置

    function resetSelection() {
        $(".selector_box").removeClass("open");
        $("input[name='select_all']").prop("checked", false);

        $(
            "#enterpriseEmployeeTable .selector input[type=checkbox][name=select]"
        ).prop("checked", false);
    }

    // 公司员工--管理层

    async function handleGetManageLists() {
        try {
            const { code, data } = await getManageLists();

            if (String(code) === "1" && data) {
                $("#managementLayerBox").html(`



								${data
                    ?.map((item) => {
                        return `<div class="check_item">

														<label><input type="checkbox" name="predefineCheckbox" value="${item.value}">${item.label}</label>

														<span>(2.2M)</span>

													</div>

										`;
                    })

                    .join("")}`);
            }
        } catch (error) {
            console.log("get_manage_list接口", error);
        }
    }

    // 公司员工--部门和职务职能

    async function handleGetDepartmentLists() {
        try {
            const { code, data } = await getDepartmentLists();

            if (String(code) === "1" && data) {
                $("#departmentJobFunctionsBox").html(`

								${data
                    ?.map((item) => {
                        return `<li class="list">

										<div class="check_item check_all">

											<label for="">

												<input type="checkbox" name="devepmentSelect" value="${item.value}">

												${item.label}

											</label>

											<em></em>

										</div>

										<ul>

										${item.children
                            ?.map((citem) => {
                                return `

											<li>

												<div class="check_item">

													<label>

														<input type="checkbox" name="devepmentSelect" value="${citem.value}">${citem.label}

													</label>

												</div>



											</li>



												`;
                            })

                            .join("")}

										</ul>

									</li>`;
                    })

                    .join("")}`);

                // $('.detail_main .box_item .high_search_user .item').on("click",function(even){

                // 	$(this).find('.item_drop').toggle();

                // 	$(this).parents('.label').siblings().find('.item_drop').hide();

                // 	event.stopPropagation();

                // })

                $(
                    ".detail_main .box_item .high_search_user .item_drop .check_item"
                ).on("click", function (even) {
                    $(this).next("ul").slideToggle();

                    $(this).toggleClass("cur");

                    event.stopPropagation();
                });

                $(document).on("click", function (e) {
                    if (
                        $(e.target).closest(
                            ".detail_main .box_item .high_search_user .item"
                        ).length == 0 &&
                        $(e.target).closest(
                            ".detail_main .box_item .high_search_user .item_drop"
                        ).length == 0
                    ) {
                        $(".detail_main .box_item .high_search_user .item_drop").hide();

                        $(
                            ".detail_main .box_item .high_search_user .item_drop .list .check_item"
                        ).removeClass("cur");
                    }
                });

                $(
                    ".detail_main .box_item .high_search_user .item_drop .check_all label"
                ).on("click", function () {
                    event.stopPropagation();

                    if ($(this).find('input[type="checkbox"]')[0].checked) {
                        // 全选

                        $(this)
                            .parents(".check_all")
                            .next("ul")
                            .find('input[type="checkbox"]')
                            .prop("checked", true);
                    } else {
                        //全不选

                        $(this)
                            .parents(".check_all")
                            .next("ul")
                            .find('input[type="checkbox"]')
                            .prop("checked", false);
                    }
                });

                $(".item_drop .check_item label").on("click", function () {
                    if ($(this).find('input[type="checkbox"]')[0].checked) {
                        $(this).find('input[type="checkbox"]').prop("checked", true);
                    } else {
                        $(this).find('input[type="checkbox"]').prop("checked", false);
                    }

                    var result = "";

                    $("input[name='predefineCheckbox']:checked").each(function () {
                        result += $(this).val() + ",";
                    });

                    if (result != "") {
                        result = result.substring(0, result.lastIndexOf(","));
                    }

                    $("#glInput").val(result);

                    var result2 = "";

                    $("input[name='devepmentSelect']:checked").each(function () {
                        result2 += $(this).val() + ",";
                    });

                    if (result2 != "") {
                        result2 = result2.substring(0, result2.lastIndexOf(","));
                    }

                    $("#devepmentInput").val(result2);
                });

                $(".item_drop .list ul .check_item:not(.check_all) label").on(
                    "click",
                    function () {
                        // $(this).find('input[type="checkbox"]').prop("checked",true);

                        var a =
                            $(this).parents(".list").find('input[type="checkbox"]')
                                .length - 1;

                        var b = $(this)
                            .parents(".list")
                            .find(
                                '.check_item:not(.check_all) input[type="checkbox"]:checked'
                            ).length;

                        if (a === b) {
                            $(this)
                                .parents(".list")
                                .find('.check_all input[type="checkbox"]')
                                .prop("checked", true);
                        } else {
                            $(this)
                                .parents(".list")
                                .find('.check_all input[type="checkbox"]')
                                .prop("checked", false);
                        }
                    }
                );
            }
        } catch (error) {
            console.log("get_department_list接口", error);
        }
    }

    // 融资发展

    async function handleGetEnterpriseFundingEventsList(enterprise_id) {
        try {
            showLoading("#financingDevelopmentTable", "table");

            const { code, data } = await getEnterpriseFundingEventsList({
                enterprise_id,
            });

            if (String(code) === "1" && data?.list) {
                $("#financingDevelopmentTotal").html(
                    `共计 <span>${data?.list?.length || 0
                    }</span> funding development records`
                );

                $("#financingDevelopmentTable").html(`
                ${data?.list
                    ?.map((item) => {
                        return ` <tr>



												<td class="nowrap">${dateFormat(item.date, "YYYY-MM-DD")}</td>

												<td class="normal">

													${item.news_url || "-"}

												</td>

												<td class="normal">${item.type} </td>

												<td class="normal">${item.investors || "-"}</td>

												<td>${item.amount || "-"}</td>

												<td>${item.currency || "-"}</td>

											</tr>

										`;
                    })
                    .join("")}`);

                if (data?.length) {
                    if (
                        zuoooo_config.Permit.ability.indexOf(
                            "financing_development"
                        ) === -1
                    ) {
                        $("#holdChart")
                            .parent(".report.trend")
                            .parent(".ai_replace")
                            .addClass("no_view");
                        if ($("#AccountId").val() == 0) {
                            $(
                                ".financing_development.no_view_tip_box.no_login_static"
                            ).show();
                            $(".financing_development.no_view_tip_box.upgrade").hide();
                        } else {
                            $(
                                ".financing_development.no_view_tip_box.no_login_static"
                            ).hide();
                            $(".financing_development.no_view_tip_box.upgrade").show();
                        }
                    }
                }
            }
        } catch (error) {
            console.log("get_enterprise_funding_events_list接口", error);
        }
    }

    // 公司员工--搜索

    function handleCompanyStaffSearch() {
        // const enterpriseId = getURLParameter("enterprise_id");
        const enterpriseId = getUrlLastParam();

        const department_screen_val = $("#devepmentInput").val();

        const seniority_screen_val = $("#glInput").val();

        const have_mobile = $("#companyStaffPhone").is(":checked") ? 1 : 0;

        const have_email = $("#companyStaffEmail").is(":checked") ? 1 : 0;

        handleCompanyStaff(enterpriseId, {
            department_screen_val,

            seniority_screen_val,

            have_mobile,

            have_email,
        });
    }

    // 推荐公司

    async function handleGetRecommendEnterpriseList(enterpriseId) {
        try {
            rightSmallModuleLoading("#recommendedCompanies", 200);

            const { code, data } = await getRecommendEnterpriseList({
                enterprise_id: enterpriseId,
            });

            hideRightSmallModuleLoading();

            if (String(code) === "1" && data) {
                $("#recommendedCompanies").html(`



								${data
                    ?.map((item) => {
                        return `<div class="copy">

												<a class="detail_url" href="${item.url || ""}">${item.name}</a>

												<div class="country">

													<div class="i_out">

														${item.country_logo
                            ? `<img src="{{ asset('web/picture/26641dd0006f4748ae8456fa3bc9bf3b.gif') }}" alt="" style="width: 20px"  />`
                            : ""
                        }



													</div><span>${item.country}

													</span>

												</div>

											</div>

										`;
                    })

                    .join("")}`);
            }
        } catch (error) {
            console.log("get_recommend_enterprise_list接口", error);
        }
    }

    // 企业图谱

    async function handleGetEnterpriseSuperiorAndSubordinate(enterpriseId) {
        try {
            noConntenLoading("#chart-container", 190);

            const { code, data } = await getEnterpriseSuperiorAndSubordinate({
                enterprise_id: enterpriseId,
            });

            if (String(code) === "1" && data) {
                $("#chart-container").html("");

                const { suborganizations = [], owned_by_organization = {} } = data;

                let datascource = {};

                if (owned_by_organization) {
                    datascource = {
                        name: owned_by_organization?.name,

                        title: owned_by_organization?.country,

                        relationship: {
                            children_num: 8,
                        },

                        children:
                            suborganizations?.map((item) => {
                                return {
                                    name: item.name,

                                    title: item.country,

                                    relationship: {
                                        children_num: 0,
                                        parent_num: 1,
                                        sibling_num: 7,
                                    },
                                };
                            }) || [],
                    };
                } else if (suborganizations && owned_by_organization) {
                    datascource = {
                        name: owned_by_organization?.name,

                        title: owned_by_organization?.country,

                        relationship: {
                            children_num: 8,
                        },

                        children:
                            suborganizations?.map((item) => {
                                return {
                                    name: item.name,

                                    title: item.country,

                                    relationship: {
                                        children_num: 0,
                                        parent_num: 1,
                                        sibling_num: 7,
                                    },
                                };
                            }) || [],
                    };
                }

                $("#chart-container").orgchart({
                    data: datascource,

                    depth: 2,

                    nodeTitle: "name",

                    nodeContent: "title",
                });
            }
        } catch (error) {
            console.log("get_recommend_enterprise_list接口", error);
        }
    }
</script>

<script>
    // 点击社媒
    $(document).on("click", ".right_side .facebook", function () {
        console.log(this);
        if (
            zuoooo_config.Permit.ability.indexOf("enterprise_social_media") === -1
        ) {
            if ($("#AccountId").val() == 0) {
                themes_obj.loginBox("detail_email_dig");
                return false;
            } else {
                themes_obj.upgradeBox("detail_email_dig");
                return false;
            }
        }
    });

    //批量操作

    $("body").on(
        "click",
        ".global_export_form .selector input[type=checkbox][name=select]",
        function () {
            box = $("body").find(".global_export_form .selector_box");

            all = $("body").find(
                ".global_export_form .selector input[type=checkbox][name=select_all]"
            );

            select = $("body").find(
                ".global_export_form .selector input[type=checkbox][name=select]"
            );

            checkedLength = $(".global_export_form").find(
                ".selector input[type=checkbox][name=select]:checked"
            ).length;

            checkedLength > 0 ? box.addClass("open") : box.removeClass("open");

            box.find(".tips span").text(checkedLength);

            checkedLength == select.length
                ? all.prop("checked", true)
                : all.prop("checked", false);
        }
    );

    $("body").on(
        "click",
        ".global_export_form .selector input[type=checkbox][name=select_all]",
        function () {
            box = $("body").find(".global_export_form .selector_box");

            all = $("body").find(
                ".global_export_form .selector input[type=checkbox][name=select_all]"
            );

            select = $("body").find(
                ".global_export_form .selector input[type=checkbox][name=select]"
            );

            $(this).prop("checked") == true
                ? select.prop("checked", true)
                : select.prop("checked", false);

            $(this).prop("checked") == true
                ? box.addClass("open")
                : box.removeClass("open");

            checkedLength = $(".global_export_form").find(
                ".selector input[type=checkbox][name=select]:checked"
            ).length;

            box.find(".tips span").text(checkedLength);
        }
    );

    // 导出弹窗

    themes_obj.fixedRight({
        click: ".global_export_form .add_explode",

        target: ".global_export",

        check: function (obj) {
            if ($("#AccountId").val() == 0) {
                themes_obj.loginBox("data_export");

                return false;
            } else if (
                zuoooo_config.Permit.ability.indexOf("data_export") == -1
            ) {
                themes_obj.upgradeBox("data_export");

                return false;
            } else {
                return true;
            }
        },

        submit: function () {
            let id = $(".global_export_form").attr("attr-id");

            let role = $(".global_export_form").attr("attr-role");

            let type = $(".global_export_form").attr("attr-type");

            let where = $(".global_export_form").attr("attr-where");

            let page = $(".global_export_form").attr("attr-page");

            let email = $(".global_export input[name=email]").val();

            let range = $(".global_export input[name=range]:checked").val();
            let mode = $(".global_export input[name=range]:checked").data("mode");

            let idAry = [];

            if (mode == "tick") {
                // 已勾选

                $(".global_export_form .selector input[name=select]:checked").each(
                    function () {
                        idAry.push($(this).val());
                    }
                );
            } else if (mode == "page") {
                // 当前页面

                $(".global_export_form .selector input[name=select]").each(
                    function () {
                        idAry.push($(this).val());
                    }
                );
            }

            const enterpriseId = getUrlLastParam();
            const department_screen_val = $("#devepmentInput").val();
            const seniority_screen_val = $("#glInput").val();
            const have_mobile = $("#companyStaffPhone").is(":checked") ? 1 : 0;
            const have_email = $("#companyStaffEmail").is(":checked") ? 1 : 0;

            let FormData = {
                export_record_ids: idAry?.join(","),
                export_type: range,
                enterprise_id: enterpriseId,
                department_screen_val,
                seniority_screen_val,
                have_mobile,
                have_email,
                // IdAry: idAry,

                // Email: email,

                // Range: range,

                // Md5: id,

                // Role: role,

                // Type: type,

                // Where: where,

                // page: page
            };

            // if (range == "all") {
            //     const enterpriseId = getUrlLastParam();
            //     FormData.enterprise_id = enterpriseId
            // }

            console.log(FormData);

            var xhr = new XMLHttpRequest();
            xhr.open(
                "GET",
                ajax_request_domain +
                "/people/build_employee_export_record?" +
                $.param(FormData),
                true
            ); // 也可以使用POST方式，根据接口

            xhr.setRequestHeader("token", getLocalStorage("token"));

            xhr.responseType = "blob"; // 返回类型blob

            // 定义请求完成的处理函数，请求前也可以增加加载框/禁用下载按钮逻辑

            xhr.onload = function () {
                // 请求完成

                if (this.status === 200) {
                    if (this.response.type == "application/json") {
                        this.response.text().then(function (text) {
                            text = JSON.parse(text);

                            if (text.code == 0) {
                                global_obj.win_alert_auto_close(
                                    text.msg,
                                    "fail",
                                    2000,
                                    undefined,
                                    0
                                );

                                return;
                            }
                        });
                    } else {
                        // 返回200

                        var blob = this.response;

                        var reader = new FileReader();

                        reader.readAsDataURL(blob); // 转换为base64，可以直接放入a表情href

                        reader.onload = function (e) {
                            // 转换完成，创建一个a标签用于下载

                            var a = document.createElement("a");

                            a.download = "公司员工.zip";

                            a.href = e.target.result;

                            $("body").append(a); // 修复firefox中无法触发click

                            a.click();

                            $(a).remove();

                            global_obj.win_alert_auto_close(
                                "Success",
                                "success",
                                2000,
                                undefined,
                                0
                            );
                        };
                    }
                } else {
                    global_obj.new_win_alert(
                        "Error",
                        "",
                        "alert",
                        1,
                        "none",
                        lang_obj.user.login.reminder_know
                    );
                }
            };

            // 发送ajax请求

            xhr.send();
        },
    });

    // 导出数据

    $("#ExportDatas").on("click", async () => {
        toastr.options = {
            positionClass: "toast-top-center",
        };

        // const enterpriseId = getURLParameter("enterprise_id");
        const enterpriseId = getUrlLastParam();

        const params = {
            export_type: "all",

            is_detail: true,

            seniority_screen_val: "",

            department_screen_val: "",

            enterprise_id: enterpriseId,

            have_email: 0,

            have_mobile: 0,
        };

        try {
            const { code, msg, data } = await buildEmployeeExportRecord(params);

            if (String(code) === "1") {
                toastr.success(msg);
            }
        } catch (error) {
            console.log("build_employee_export_record接口", error);
        }
    });

    // 公司员工列表发送邮件

    function handleListSendEmail() {
        const emails = selectCollectEmail?.join(",");
        if (emails) {
            window.open(`/email-SendMail.html?emails=${emails}`, "_blank");
        }
    }
</script>

<div class="global_fixed_right global_export">
    <div class="top_title">
        <span> Export Data</span><a href="javascript:;"> </a>
    </div>
    <div class="content">
        <form class="fixed_form">
            <div class="fixed_item item_range">
                <div class="title">Export Range</div>
                <div class="fixed_container">
                    <div class="fixed_radio">
                        <input id="fixed_radio1" type="radio" name="range" value="limit" data-mode="tick" checked="" /><label
                            for="fixed_radio1"> Selected Data</label>
                    </div>
                    <div class="fixed_radio">
                        <input id="fixed_radio2" type="radio" name="range" value="limit" data-mode="page" /><label
                            for="fixed_radio2">Current Page Data </label>
                    </div>
                    <div class="fixed_radio">
                        <input id="fixed_radio3" type="radio" name="range" value="all" /><label for="fixed_radio3">First 200
                            Search Results </label>
                    </div>
                </div>
            </div>
            <div class="fixed_item">
                <div class="title">Export to Email</div>
                <div class="fixed_container">
                    <div class="fixed_input">
                        <input type="text" name="email" />
                    </div>
                    <div class="tips">
                        Due to the Size of the File, It Will Be Sent to a Specified
                        Email
                    </div>
                </div>
            </div>
            <input type="hidden" name="Id" />
        </form>
    </div>
    <div class="bottom_button">
        <div class="button w36" name="cancel">Cancel</div>
        <div class="button main w58" name="submit">Export</div>
    </div>
</div>

<script>
    $(".detail_main .abs").on(
        "click",
        ".menu_list a,.menu_out a,.data_out a,.menu_change a",
        function () {
            themes_obj.recordUserModel("DetailSwitchCard");
        }
    );
</script>

<div id="footer">
    <!-- <div class="wide">
        <div class="footer_friend">
            <span>Friendly Links:</span>
            <a href="https://www.noxa20.cn" target="_blank" title="NOXA20">NOXA20</a>
            <em>|</em>
            <a href="https://www.zhiyanxuan.com" target="_blank" title="家教">家教</a>
            <em>|</em>
            <a href="https://www.chat2024.cn" target="_blank" title="chatGPT入口">chatGPT入口</a>
            <em>|</em>
            <a href="http://www.doryang1.com" target="_blank" title="56书库">56书库</a>
            <em>|</em>
            <a href="https://www.lijiajj.com" target="_blank" title="海关数据查询平台">海关数据查询平台</a>
            <em>|</em>
            <a href="https://www.zuoooo.com" target="_blank" title="海关数据查询平台">海关数据查询平台</a>
        </div>
    </div> -->
    <!-- <div class="wide">
        <div class="footer_bottom">
            <div class="footer_left">
                <div class="logo">
                    <img src="static/picture/logo.svg" alt="Keepoe" />
                </div>
                <div class="copyright">
                    <em> | </em> <span>重庆知站科技有限公司©Copyright </span>
                    <span>Registration No.:<a href="https://beian.miit.gov.cn">渝ICP备2020013150号-13</a>
                    </span>
                </div>
            </div>
            <div class="footer_right">
                <a href="javascript:;"> Tutorial Videos </a> <em>| </em>
                <a href="/about">About Us </a> <em>| </em>
                <a href="/blog">Knowledge Base </a> <em>| </em>
                <a href="javascript:;">Privacy Policy </a> <em>| </em>
                <a href="javascript:;">User Agreement </a>
            </div>
        </div>
    </div> -->
</div>

<script>
    $(function () {
        $("body")
            .on(
                "mouseover",
                "#header .B2B_enterprise_library, .products_intro_box",
                function () {
                    $(".products_intro_box").addClass("current");
                }
            )
            .on(
                "mouseleave",
                "#header .B2B_enterprise_library, .products_intro_box",
                function () {
                    $(".products_intro_box").removeClass("current");
                }
            );
    });
</script>
<!-- B2B企业库 end -->
<script src="{{ asset('web/js/jweixin-1.3.2.js') }}"></script>

<div class="video_alert">
    <div class="video_box">
        <i> </i>
    </div>
</div>
<script src="{{ asset('web/js/load_particles.js') }}"></script>
<script src="{{ asset('web/js/queue.js') }}"></script>
<script>
    $("#global_login_form input[name=__token__]").val(
        getLocalStorage("token")
    );
    $("#AccountId").val(getLocalStorage("userId"));
    $("#Level").val(getLocalStorage("user_level"));
    $(function () {
        // 获取用户基础信息
        $.ajax({
            url: ajax_request_domain + "/base/get_user_base_info",
            type: "post",
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            beforeSend: (xhr) => {
                xhr.setRequestHeader("token", getLocalStorage("token"));
            },
            success: function (res) {
                if (res.code == 1) {
                    const data = res.data;
                    if (data.is_login) {
                        $(".is_login.my span").text(data.collect_num);
                        $(".is_login .account_name").text(data.nickname);
                        $(".is_login .vip_name").text(data.vip_data.name);
                        $(".is_login .vip_expiretime").text(data.vip_expiretime);
                        $(".email_send_times").text(data.email_send_times);

                        setLocalStorage(
                            "userId",
                            data.userinfo.id,
                            data.userinfo.expiretime
                        );
                        setLocalStorage(
                            "token",
                            data.userinfo.token,
                            data.userinfo.expiretime
                        );
                        setLocalStorage(
                            "user_rule_data",
                            data.userinfo.rule_data,
                            data.userinfo.expiretime
                        );
                        setLocalStorage(
                            "user_limit_data",
                            data.userinfo.limit_data,
                            data.userinfo.expiretime
                        );
                        setLocalStorage(
                            "user_level",
                            data.userinfo.vip,
                            data.userinfo.expiretime
                        );

                        if (data.is_subscription) {
                            $(".cancel_stripe_subscriptions").show();
                        } else {
                            $(".cancel_stripe_subscriptions").hide();
                        }

                        $(".is_login").show();
                        $(".no_login").hide();
                    } else {
                        $(".cancel_stripe_subscriptions").hide();
                        $(".is_login").hide();
                        $(".no_login").show();
                    }
                } else if (res.code == 0) {
                    global_obj.new_win_alert(
                        res.msg,
                        function () {
                            global_obj.div_mask(1);
                        },
                        undefined,
                        undefined,
                        "fail"
                    );
                    return;
                }
            },
            error: function (error) {
                if (error.status === 500) {
                    global_obj.div_mask();
                    global_obj.win_alert_auto_close(
                        "System error, please try again later",
                        "fail",
                        2000,
                        undefined,
                        0,
                        function () {
                            global_obj.div_mask(1);
                        }
                    );
                    return false;
                }
                if (error.status === 401) {
                    themes_obj.loginBox("index_type");
                    return false;
                } else if (error.status === 403) {
                    themes_obj.upgradeBox("index_type");
                    return false;
                }
            },
        });

        // 获取客服信息
        $.ajax({
            url: ajax_request_domain + "/base/get_contact",
            type: "post",
            dataType: "json",
            contentType: "application/json; charset=utf-8",
            beforeSend: (xhr) => {
                xhr.setRequestHeader("token", getLocalStorage("token"));
            },
            success: function (data) {
                const parentObj = $(".contact_kf");
                parentObj.find(".c_box_phone span").text(data["mobile"]);
                parentObj.find(".c_box_email span").text(data["email"]);
                parentObj
                    .find(".c_box_qrcode .qrcode img")
                    .attr("src", data["qrcode"]);
            },
            error: function (error) {
                if (error.status === 500) {
                    global_obj.div_mask();
                    global_obj.win_alert_auto_close(
                        "System error, please try again later",
                        "fail",
                        2000,
                        undefined,
                        0,
                        function () {
                            global_obj.div_mask(1);
                        }
                    );
                    return false;
                }
                if (error.status === 401) {
                    themes_obj.loginBox("index_type");
                    return false;
                } else if (error.status === 403) {
                    themes_obj.upgradeBox("index_type");
                    return false;
                }
            },
        });

        // 退出登录
        $(document).on("click", ".logout", function () {
            $.ajax({
                url: ajax_request_domain + "/user/logout",
                type: "post",
                dataType: "json",
                contentType: "application/json; charset=utf-8",
                beforeSend: (xhr) => {
                    xhr.setRequestHeader("token", getLocalStorage("token"));
                },
                success: function (res) {
                    if (res.code === 1) {
                        removeLocalStorage("userId");
                        removeLocalStorage("token");
                        removeLocalStorage("user_rule_data");
                        removeLocalStorage("user_limit_data");
                        removeLocalStorage("user_level");
                        window.location.reload();
                    } else if (res.code === 0) {
                        global_obj.new_win_alert(
                            res.msg,
                            function () {
                                global_obj.div_mask(1);
                            },
                            undefined,
                            undefined,
                            "fail"
                        );
                    }
                },
                error: function (error) {
                    if (error.status === 500) {
                        global_obj.div_mask();
                        global_obj.win_alert_auto_close(
                            "System error, please try again later",
                            "fail",
                            2000,
                            undefined,
                            0,
                            function () {
                                global_obj.div_mask(1);
                            }
                        );
                        return false;
                    }
                    if (error.status === 401) {
                        themes_obj.loginBox("index_type");
                        return false;
                    } else if (error.status === 403) {
                        themes_obj.upgradeBox("index_type");
                        return false;
                    }
                },
            });
        });

        // 购买套餐
        $(".global_alert_upgrade .title .close").on("click", function () {
            if (!$(".main_list .left_side").hasClass("current")) {
                global_obj.div_mask(1);
            }
            $(".global_alert_upgrade .prompt_box.system").removeClass("system");
            $(".global_alert_upgrade").removeClass("cur");
        });
        $(".global_alert_upgrade .price_change span").on(
            "click",
            "",
            function () {
                $(this).addClass("cur").siblings().removeClass("cur");
                if ($(this).hasClass("show_month")) {
                    $(
                        '.global_alert_upgrade .pay_times_box input[name="Times"][value="month"]'
                    )
                        .parents("label")
                        .click();
                } else {
                    $(
                        '.global_alert_upgrade .pay_times_box input[name="Times"][value="year"]'
                    )
                        .parents("label")
                        .click();
                }
            }
        );
        $(".global_alert_upgrade").on("click", ".rows label", function () {
            var _this = $(this);
            $(this).parents(".rows").find("label").removeClass("cur");
            $(this).addClass("cur");
            $(this).find("input[type=radio]").attr("checked", "checked");
            $(this).siblings().find("input[type=radio]").removeAttr("checked");
            let this_time = $(
                '.global_alert_upgrade .pay_times_box input[name="Times"]:checked'
            ).val();
            if ($(this).find("input").attr("name") == "Times") {
                let attr_name = "";
                if (this_time == "month") {
                    attr_name = "month_";
                }
                $(
                    ".global_alert_upgrade .upgrade_level_box_new_plus .price_item"
                ).each(function () {
                    $(this)
                        .find(".price_box span.r span")
                        .html(
                            $(this)
                                .find(".price_box span.r")
                                .attr(attr_name + "yuan")
                        );
                    $(this)
                        .find(".price_box span.r span.price_val")
                        .html(
                            $(this)
                                .find(".price_box span.r")
                                .attr(attr_name + "price")
                        );
                });
                $(
                    '.global_alert_upgrade .upgrade_level_box_new_plus input[name="Level"]:checked'
                ).click();
                return false;
            }
            if ($(this).find("input").attr("name") == "Level") {
                let scale = 1 * 100;
                let this_p = 0;
                if (this_time == "month") {
                    this_p =
                        Math.ceil(
                            parseFloat($(this).find(".r").attr("month_price")) * scale
                        ) / 100;
                } else {
                    this_p =
                        Math.ceil(
                            parseFloat($(this).find(".r").attr("price")) * scale
                        ) / 100;
                }
                let result_p = lang_obj.global.symbol + this_p.toFixed(2);
                $(".global_alert_upgrade .rows .price").html(result_p);
                $(".global_alert_upgrade_pay_btn .rows .price").html(result_p);
            }
            $(".of_the_public_info .payment_info .CorporateOId").html("");

            if (
                $(
                    '.global_alert_upgrade .pay_method_box input[name="Method"]:checked'
                ).val() == "public"
            ) {
                $(".global_alert_upgrade .of_the_public_info").show();
                $(".global_alert_upgrade .pay_btn").html(
                    lang_obj.user.level.transfer
                );
                $(".global_alert_upgrade_pay_btn .pay_btn").html(
                    lang_obj.user.level.transfer
                );
            } else {
                $(".global_alert_upgrade .pay_btn").html(
                    lang_obj.user.level.pay_now
                );
                $(".global_alert_upgrade_pay_btn .pay_btn").html(
                    lang_obj.user.level.pay_now
                );
                $(".global_alert_upgrade .of_the_public_info").hide();
            }
        });
        if (window.__wxjs_environment == "miniprogram") {
            $(".miniprogram_alipay").remove();
        }
        $(".detail_main .box_item .bottom .no_view_tip_box .go_upgrade").on(
            "click",
            function () {
                $(".global_alert_upgrade").addClass("cur");
                $(".div_mask").show();
            }
        );
        $(".alert_detail .go_upgrade").on("click", function () {
            $(".global_alert_upgrade").addClass("cur");
        });
        $(".global_alert_upgrade .pay_btn").on("click", function () {
            let formData = getAlertUpgradeFormData();
            if (zuoooo_config.lang == "en") {
                formData["paytype"] = "Paypal";
            }
            if (formData["Level"] && formData["paytype"]) {
                let _Method = formData["paytype"];
                formData["referer_url"] = window.location.href;
                $.ajax({
                    url: ajax_request_domain + "/vip/initiate_user_set_vip",
                    type: "post",
                    dataType: "json",
                    data: formData,
                    beforeSend: (xhr) => {
                        xhr.setRequestHeader("token", getLocalStorage("token"));
                    },
                    success: function (data) {
                        if (data.code === 1) {
                            if (formData["paytype"] === "stripe") {
                                document.cookie =
                                    "stripe_pay_success_url=" +
                                    encodeURIComponent(window.location.pathname) +
                                    ";expires=" +
                                    86400 +
                                    "; path=" +
                                    window.location.host;
                                document.cookie =
                                    "stripe_pay_error_url=" +
                                    encodeURIComponent(window.location.pathname) +
                                    ";expires=" +
                                    86400 +
                                    "; path=" +
                                    window.location.host;
                            }

                            let OId = data.data.OId;
                            let CorporateOId = !data.data;

                            global_obj.div_mask(1);
                            $(".global_alert_upgrade .prompt_box.system").removeClass(
                                "system"
                            );
                            $(".global_alert_upgrade").removeClass("cur");
                            if (!CorporateOId) {
                                if (window.__wxjs_environment == "miniprogram") {
                                    wx.miniProgram.navigateTo({
                                        url: "/pages/payment/payment?OId=" + OId,
                                    });
                                } else {
                                    if (zuoooo_config.IsMobile == 1) {
                                        window.location.href =
                                            "/payment/?OId=" + OId + "&bf=" + formData["bf"];
                                    } else {
                                        if (zuoooo_config.IsApp == 1) {
                                            global_obj.div_mask(0, "email_div_mask");
                                            global_obj.win_alert_auto_close(
                                                lang_obj.user.level.pay_browser_hint,
                                                "fail",
                                                2000,
                                                undefined,
                                                0,
                                                function () {
                                                    global_obj.div_mask(1, "email_div_mask");
                                                }
                                            );
                                        } else {
                                            global_obj.div_mask(0, "email_div_mask");
                                            $(".global_alert_payment iframe").html(data.data);
                                            if (formData["paytype"] == "alipay") {
                                                $(".global_alert_payment").addClass("alipay_box");
                                            } else {
                                                $(".global_alert_payment").removeClass(
                                                    "alipay_box"
                                                );
                                            }
                                            $(".global_alert_payment").addClass("cur");
                                        }
                                    }
                                }
                            } else {
                                global_obj.div_mask(0, "email_div_mask");
                                global_obj.win_alert_auto_close(
                                    lang_obj.user.level.tips_3,
                                    "",
                                    2000,
                                    undefined,
                                    0,
                                    function () {
                                        global_obj.div_mask(1, "email_div_mask");
                                    }
                                );
                            }
                        } else {
                            global_obj.div_mask();
                            global_obj.win_alert_auto_close(
                                data.msg,
                                "fail",
                                2000,
                                undefined,
                                0,
                                function () {
                                    global_obj.div_mask(1);
                                }
                            );
                        }
                    },
                    error: function (error) {
                        if (error.status === 500) {
                            global_obj.div_mask();
                            global_obj.win_alert_auto_close(
                                "System error, please try again later",
                                "fail",
                                2000,
                                undefined,
                                0,
                                function () {
                                    $(".global_alert_upgrade").removeClass("cur");
                                    global_obj.div_mask(1);
                                }
                            );
                            return false;
                        }
                        if (error.status === 401) {
                            $(".global_alert_upgrade").removeClass("cur");
                            global_obj.div_mask(1);
                            themes_obj.loginBox("index_type");
                            return false;
                        } else if (error.status === 403) {
                            $(".global_alert_upgrade").removeClass("cur");
                            global_obj.div_mask(1);
                            themes_obj.upgradeBox("index_type");
                            return false;
                        }
                    },
                });
            } else {
                global_obj.div_mask(1);
                $(".global_alert_upgrade .prompt_box.system").removeClass("system");
                $(".global_alert_upgrade").removeClass("cur");
            }
        });

        //手机版价格固定
        mobile_fixed_price();
        $(window).scroll(function () {
            mobile_fixed_price();
        });
        $(window).resize(function () {
            mobile_fixed_price();
        });

        function mobile_fixed_price() {
            if ($(window).width() <= 500) {
                if (!$(".global_alert_upgrade_pay_btn").hasClass("cur")) {
                    $(".global_alert_upgrade_pay_btn").addClass("cur");
                }
                $(".global_alert_upgrade .price_bottom_hide").hide();
            } else {
                if ($(".global_alert_upgrade_pay_btn").hasClass("cur")) {
                    $(".global_alert_upgrade_pay_btn").removeClass("cur");
                }
                $(".global_alert_upgrade .price_bottom_hide").show();
            }
        }

        window.addEventListener("message", function (e) {
            if (e.data == "message") {
                if ($("#AccountId").val() == 0) {
                    $(".global_alert_payment").removeClass("cur");
                    themes_obj.loginBox("pay_success");
                    return false;
                } else {
                    window.location.reload();
                }
            }
        });

        // 登录
        $("#global_login_form").on("submit", function () {
            let login_form_flag = 1;

            $(".input_tips").each(function () {
                $(this).html($(this).attr("tips"));
            });
            var _this = $(this);
            if (
                global_obj.check_form(
                    _this.find("*[notnull]"),
                    _this.find("*[format]"),
                    undefined,
                    1
                )
            ) {
                return false;
            }

            if ($("body").hasClass("lang_en")) {
                //邮箱格式验证
                $("input[name=Email]", "#global_login_form").each(function () {
                    var reg = /^\w+[a-zA-Z0-9-.+_]+@[a-zA-Z0-9-.+_]+\.\w*$/;
                    if (reg.test($(this).val()) === false) {
                        $(this).css("border", "2px solid #ff0000").addClass("null");
                        var msg = "Incorrect Email Format";
                        $(this).next(".input_tips").html(msg);
                        $(this).next(".input_tips").show();

                        login_form_flag = 0;
                        return false;
                    }
                });
            } else {
                //手机号格式验证
                $("input[name=Phone]", "#global_login_form").each(function () {
                    // var reg = /^1[3456789]\d{9}$/;
                    var reg = /^\d{11}$/;
                    var reg2 = /^xunji\d{2}$/;
                    if (
                        reg.test($(this).val()) === false &&
                        reg2.test($(this).val()) === false
                    ) {
                        $(this).css("border", "2px solid #ff0000").addClass("null");
                        var msg = "Incorrect Phone Number Format";
                        $(this).next(".input_tips").html(msg);
                        $(this).next(".input_tips").show();

                        login_form_flag = 0;
                        return false;
                    }
                });
            }
            if (!login_form_flag) {
                return false;
            }

            _this.find(".btn_submit").attr("disabled", true);
            $.ajax({
                url: ajax_request_domain + _this.attr("action"),
                type: "POST",
                dataType: "json",
                data: _this.serialize(),
                beforeSend: (xhr) => {
                    xhr.setRequestHeader("token", getLocalStorage("token"));
                },
                success: function (res) {
                    if (res.code != 2) {
                        $(".user_login_box .close").click();
                    }
                    if (res.code == 1) {
                        const data = res.data;
                        if (!data) {
                            window.location.href = $("input[name=jump]").val();
                        }
                        setLocalStorage(
                            "userId",
                            data.userinfo.id,
                            data.userinfo.expiretime
                        );
                        setLocalStorage(
                            "token",
                            data.userinfo.token,
                            data.userinfo.expiretime
                        );
                        setLocalStorage(
                            "user_rule_data",
                            data.userinfo.rule_data,
                            data.userinfo.expiretime
                        );
                        setLocalStorage(
                            "user_limit_data",
                            data.userinfo.limit_data,
                            data.userinfo.expiretime
                        );
                        setLocalStorage(
                            "user_level",
                            data.userinfo.vip,
                            data.userinfo.expiretime
                        );
                        window.location.reload();
                    } else if (res.code == 0) {
                        global_obj.new_win_alert(
                            res.msg,
                            function () {
                                global_obj.div_mask(1);
                            },
                            undefined,
                            undefined,
                            "fail"
                        );
                    }
                    _this.find(".btn_submit").attr("disabled", false);
                },
                error: function (error) {
                    if (error.status === 500) {
                        global_obj.div_mask();
                        global_obj.win_alert_auto_close(
                            "System error, please try again later",
                            "fail",
                            2000,
                            undefined,
                            0,
                            function () {
                                global_obj.div_mask(1);
                            }
                        );
                        return false;
                    }
                    if (error.status === 401) {
                        themes_obj.loginBox("index_type");
                        return false;
                    } else if (error.status === 403) {
                        themes_obj.upgradeBox("index_type");
                        return false;
                    }
                },
            });
            return false;
        });
    });

    function user_level($tips = "") {
        if (!$tips) {
            $tips = "This Feature Requires a Higher Version";
            $type = 0;
        } else {
            $type = 1;
        }
        global_obj.new_win_alert(
            $tips,
            function () {
                global_obj.div_mask();
                $(".global_alert_upgrade").addClass("cur");
                if ($type) {
                    $(".global_alert_upgrade .rows label input[name=Level]").each(
                        function () {
                            if ($(this).attr("value") == 20) {
                                $(this).parents("label").click();
                            }
                        }
                    );
                }
            },
            "alert",
            1,
            "none",
            "Upgrade Now"
        );
    }

    function getAlertUpgradeFormData() {
        let formData = {};
        $(".global_alert_upgrade .rows label").each(function () {
            if ($(this).hasClass("cur")) {
                if ($(this).find("input").attr("name") == "Level") {
                    formData["Level"] = $(this).find("input").val();
                } else if ($(this).find("input").attr("name") == "Times") {
                    formData["Times"] = $(this).find("input").val();
                } else if ($(this).find("input").attr("name") == "Method") {
                    formData["paytype"] = $(this).find("input").val();
                }
            }
        });
        return formData;
    }

    var queue = new PopQueue();
</script>
<script>
    queue.dequeue();
</script>
</body>

</html>
